package com.leo.persistence.sqlSession;

import java.sql.SQLException;
import java.util.List;

public interface SqlSession {

    <E> E selectOne(String statementId, Object... params) throws Exception;

    // statementId = namespace.id (唯一标识)
    <E> List<E> selectList(String statementId, Object... params) throws Exception;

    int insert(String statementId, Object... params) throws Exception;

    int update(String statementId, Object... params) throws Exception;

    int delete(String statementId, Object... params) throws Exception;

    <T> T getMapper(Class<?> mapperClass);
}
